<template>
	<view class="topic-nav">
		<view class="m-f-jsb nav-one">
			<view class="classitic">热门分类</view>
			<view class="m-f-jcc more" @tap="openTopicNav">
				更多
				<view class="icon iconfont icon-qianjinxiayige"></view>
			</view>
		</view>
		<view class="m-f-jcc nav-two">
			<template v-for="(item, index) in nav">
				<view class="nav-tag m-f-jcc" :key="index">{{item.name}}</view>
			</template>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			nav: {
				type: Array
			}
		},
		methods: {
			openTopicNav() {
				uni.navigateTo({
					url: '../../pages/topic-nav/topic-nav'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topic-nav {
		border-bottom: 1rpx solid #EEEEEE;
		border-top: 2rpx solid #EEEEEE;
		padding: 20rpx;
		.nav-one {
			margin-bottom: 15rpx;
			.classitic {
				font-size: 32rpx;
				color: #333333;
			}
			.more {
				color: #9E9E9E;
			}
		}
		.nav-two {
			.nav-tag {
				flex: 1;
				background: #dddddd;
				color: #828282;
				border-radius: 10rpx;
				margin: 0 10rpx;
			}
		}
	}
</style>
